package com.waves.user.service;

import cn.dev33.satoken.util.SaResult;
import com.baomidou.mybatisplus.extension.service.IService;
import com.waves.core.web.domain.R;
import com.waves.core.web.domain.TableDataInfo;
import com.waves.user.domain.dto.FollowPageDTO;
import com.waves.user.domain.dto.UserUpdateDTO;
import com.waves.user.domain.dto.user.BlackDTO;
import com.waves.user.domain.dto.user.ModifyNameDTO;
import com.waves.user.domain.dto.user.SummeryInfoDTO;
import com.waves.user.domain.entity.User;
import com.waves.user.domain.vo.UserDetailVO;
import com.waves.user.domain.vo.UserInfoVO;
import com.waves.user.domain.vo.UserVO;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface UserService extends IService<User> {
    //登录
    SaResult login(String email, String password) throws Exception;
    //登出
    SaResult logout();



    /**
     * 获取前端展示信息
     *
     * @param uid
     * @return
     */
    UserInfoVO getUserInfo(Long uid);

    /**
     * 修改用户名
     *
     * @param uid
     * @param req
     */
    void modifyName(ModifyNameDTO req);

    /**
     * 用户注册，需要获得id
     *
     * @param user
     */
    void register(User user);

    void black(BlackDTO req);

    /**
     * 获取用户汇总信息
     *
     * @param req
     * @return
     */
    List<com.waves.user.domain.dto.SummeryInfoDTO> getSummeryUserInfo(SummeryInfoDTO req);

    R<Object> followUser(long id);

    TableDataInfo<UserDetailVO> listFollowUser(FollowPageDTO dto);

    R<Object> updateUserInfo(UserUpdateDTO dto);

    R<UserDetailVO> getUserInfos(long uid);
}
